package cate.common.table.activity.dungeonup;

import cate.common.annotation.SplitParse;
import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import cate.common.table.item.hero.StarGroupList;
import com.fasterxml.jackson.annotation.JsonIgnore;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass(value = "魔塔配置")
public class DUConfigRow extends ERow {
    @NoteField(value = "层数")
    public int floor;
    @NoteField(value = "自选一特殊奖励池")
    public int oneGroup;
    @NoteField(value = "自选二特殊奖励池")
    public int twoGroup;
    @NoteField(value = "卡牌奖励池")
    public int group;
    @NoteField(value = "特殊事件概率")
    public String eventStr;
    @NoteField(value = "通关宝箱奖励")
    public String passChestStr;
    @NoteField(value = "单抽消耗")
    public String consumeStr;
    @NoteField(value = "活动配置ID")
    public int configID;

    @Override
    public void parse(XSSFRowWrap xrw) {
        super.parse(xrw);
        this.id = xrw.getInteger("ID");
        this.floor = xrw.getInteger("层数");
        this.oneGroup = xrw.getInteger("自选一特殊奖励池", -1);
        this.twoGroup = xrw.getInteger("自选二特殊奖励池", -1);
        this.group = xrw.getInteger("卡牌奖励池", 1);
        this.eventStr = xrw.getString("特殊事件概率", "1:500:0");
        this.passChestStr = xrw.getString("通关宝箱奖励", "");
        this.consumeStr = xrw.getString("单抽消耗");
        this.configID = xrw.getInteger("活动配置ID");
    }

    @JsonIgnore
    public DUEventList config = new DUEventList();

    @Override
    public void decode() {
        config.parse(eventStr);
    }
}
